package com.desire.interceptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author LittleDesire
 * @description
 * @date 2022-04-29 周五 14:26
 * @since 17
 */
//@Configuration
public class LoginConfig implements WebMvcConfigurer {
    @Autowired
    LogInterceptor logInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(logInterceptor)
                .addPathPatterns("/user/**")
                .excludePathPatterns("/user/getData");
    }
}
